package export.monster
{
	import com.game.manager.AnimationManager;
	import base.BaseBullet;
	import base.BaseMonster;
	import com.game.engine.MainGame;
	import export.bullet.RegionBullet;
	import flash.geom.Rectangle;
	
	public class Monster103 extends BaseMonster
	{
		public function Monster103()
		{
			super();
		}
		
		override protected function initBBDC():void
		{
			bbdc = AnimationManager.getAnimation("Monster103Action");
			bbdc.setAction("idle");
			bbdc.turnRight();
			bbdc.addCallBack(onEnterFrame, onActionOver);
			bodyContainer.addChild(bbdc);
		}
		
		override protected function initCollideArea():void
		{
			collideBox = new Rectangle(-60, -100, 120, 100);
			super.initCollideArea();
		}
		
		override protected function initAttribute():void
		{
			super.initAttribute();
			mavo.attackRange = 120;
			if(MainGame.getIns().levelData.levelID == "1_1")
			{
				mavo.isBoss = true;
				mavo.hpMax *= 2;
//				mavo.normalAttackRate = 1;
//				mavo.hpMax = 2000 * 10000;
			}
			else
			{
				mavo.isBoss = false;
			}
			setFullHp();
		}
		
		override protected function onEnterFrame(action:String, frameCount:int):void
		{
			var b:BaseBullet;
			switch (action)
			{
				case "attack1":
					if(frameCount == 3)
					{
						b = new RegionBullet();
						b.setCollideArea(0, -100, 120 * bbdc.getDirect(), 100);
						b.setDestroyInCount(bbdc.frameLeft);
						b.setHurt(getActionHurt(action));
						b.setOwner(this);
						b.setAction("Monster103Attack1");
						b.setDirect(bbdc.getDirect());
						gc.gameScene.addChild(b);
						magicBulletArray.push(b);
					}
			}
		}
	}
}